package com.suhuamo;

import com.suhuamo.mybatis.MapperProxyFactory;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author yuanchuncheng
 * @slogan 不待春风慢，我以明月宴群山。
 * @date 2023-10-30
 */
public class Main {
    public static void main(String[] args) throws SQLException {
        StudentMapper studentMapper = MapperProxyFactory.getMapper(StudentMapper.class);
        Student studentById = studentMapper.getStudentById(3);
        System.out.println("studentById = " + studentById);
        List<Student> studentListByAge = studentMapper.getStudentListByAge("小花",23);
        System.out.println("studentListByAge = " + studentListByAge);

        PersonMapper personMapper = MapperProxyFactory.getMapper(PersonMapper.class);
        Person personById = personMapper.getPersonById(1);
        System.out.println("personById = " + personById);
    }
}